#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    long long n, k, i;
    scanf("%lld%lld", &n, &k);
    long long count = 0;
    if (k == 0)
    {
        count = n * n;
    }
    else
    {
        for (i = k + 1; i <= n; i++)
        {
            count += (n / i) * (i - k) + (n % i >= k ? n % i - k + 1 : 0);
        }
    }
    printf("%lld", count);
    return 0;
}